﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.XtraEditors;

namespace td.Core.Security
{
    public partial class AddUser : DevExpress.XtraEditors.XtraForm
    {
        public AddUser()
        {
            InitializeComponent();
            CenterToScreen();
            this.FormClosing += new FormClosingEventHandler(AddUser_FormClosing);
        }

        void AddUser_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (this.DialogResult == System.Windows.Forms.DialogResult.OK)
                if (this.m_textBoxUserName.Text.Trim() == "")
                {
                    XtraMessageBox.Show("用户名称不能为空！", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.m_textBoxUserName.Focus();
                    e.Cancel = true;
                }
        }


        public string UserName
        {
            get { return m_textBoxUserName.Text; }
        } // End UserName

        // ************************************************************************

        public string Password
        {
            get { return m_textBoxPassword.Text; }
        } // End Password
        // ************************************************************************
        // Constructors.
        // ************************************************************************

        private void _DoNothing() { }

   
        // ******************************************************************
        // Overrides.
        // ******************************************************************
    }
}